package com.eduadmin.service;

import com.eduadmin.entity.SingleMax;
import com.eduadmin.mapper.SingleMaxMapper;
import com.eduadmin.mapper.StudentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class SingleMaxServiceImpl implements ISingleMaxService {
    private final SingleMaxMapper singleMaxMapper ;

@Autowired
    public SingleMaxServiceImpl(SingleMaxMapper singleMaxMapper) {
        this.singleMaxMapper = singleMaxMapper;
    }
    @Override
    public  int batchInsert(List<SingleMax> list){
     singleMaxMapper.batchInsert(list);
     return 1;
    }
    public int deleteByParams(Map<String,Object> paraMap){
     singleMaxMapper.deleteByParams(paraMap);
     return 1;
    }
    public List<SingleMax> getAllByParams(Map<String,Object> paraMap){
    return singleMaxMapper.getAllByParams(paraMap);
    }
    // 查询满足条件的记录条数
    public int getAllNumberByParams(Map<String,Object> paraMap){
    return singleMaxMapper.getAllNumberByParams(paraMap);
    }
}
